use super::*;
pub struct VoicemeeterOption<'a> {
remote: &'a VoicemeeterRemote,
}
impl<'a> VoicemeeterOption<'a> {
#[doc(hidden)]
pub fn new(remote: &'a VoicemeeterRemote) -> Self {
VoicemeeterOption { remote }
}
pub fn param(&self, dot: impl Display) -> Cow<'static, ParameterNameRef> {
Cow::Owned(format!("{VOICEMEETER_OPTION}.{}", dot).into())
}
pub fn sr(&self) -> FloatParameter {
FloatParameter::new_unranged(self.param("sr"), self.remote)
}
pub fn asio_sr(&self) -> BoolParameter {
BoolParameter::new(self.param("ASIOsr"), self.remote)
}
pub fn delay(&self, bus: usize) -> IntParameter {
IntParameter::new(self.param(format!("delay[{bus}]")), self.remote, 0..=500)
}
pub fn buffer_mme(&self) -> IntParameter {
IntParameter::new(self.param("buffer.mme"), self.remote, 128..=2048)
}
pub fn buffer_wdm(&self) -> IntParameter {
IntParameter::new(self.param("buffer.wdm"), self.remote, 128..=2048)
}
pub fn buffer_ks(&self) -> IntParameter {
IntParameter::new(self.param("buffer.ks"), self.remote, 128..=2048)
}
pub fn buffer_asio(&self) -> IntParameter {
IntParameter::new(self.param("buffer.asio"), self.remote, 128..=2048)
}
pub fn mode_exlusif(&self) -> BoolParameter {
BoolParameter::new(self.param("mode.exclusif"), self.remote)
}
pub fn mode_swift(&self) -> BoolParameter {
BoolParameter::new(self.param("mode.swift"), self.remote)
}
pub fn monitor_on_sel(&self) -> BoolParameter {
BoolParameter::new(self.param("MonitorOnSEL"), self.remote)
}
}